﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;

namespace T.FAS.Runtime.Base.Entity
{
    /// <summary>
    /// 行为结果项
    /// </summary>
    [Serializable]
    public class ViewModelItem
    {
        public ViewModelItem()
        { }
        public ViewModelItem(string type)
        {
            this.ViewModelItemType = type;
        }
        public string ViewModelItemType { get; set; }

        public int SortOrder { get; set; }
        /// <summary>
        /// VMItem的编号，例如DO、CDPO、EO、TableName等
        /// </summary>
        public string ViewModelItemCode { get; set; }
        public string ViewModelItemName { get; set; }
        public ViewModelItemSchema ViewModelItemSchema { get; set; }
        public void AddProperty(ViewModelItemProperty property)
        {
            if (ViewModelItemSchema == null)
                ViewModelItemSchema = new ViewModelItemSchema();
            ViewModelItemSchema.AddProperty(property);
        }
    }
}
